<template>
	<view class="Recom">
		<view v-for="(item, index) in recommend" :key="index" class="recom-item" @click="goRecom(item.title)">
			<image :src="item.image"></image>
			<text>{{item.title}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			// 评论数据
			recommend: {
				type: Array,
				default () {
					return []
				}
			}
		},
		methods: {
			goRecom(title) {
				// 逻辑的跳转
				console.log(title)
			}
		}
	}
</script>

<style lang="less">
	.Recom {
		display: flex;
		width: 100%;
		height: 240rpx;
		margin-top: 40rpx;
		padding-bottom: 20rpx;
		border-bottom: 4px solid #eee;

		.recom-item {
			margin: 0 6rpx;
			width: 25%;
			text-align: center;
			height: 100%;

			image {
				width: 100%;
				height: 80%;
			}

			text {
				height: 20%;
				font-size: 28rpx;
			}

		}
	}
</style>
